<?php 
	$data = $this->data;
	$i = 0;
?>
<div id="list_video">
	<?php foreach ($data as $item) {?>
	<div class="item_video">
		<h3 class="title_video"><?php echo $item['name']; ?></h3>
		<p id="item-video-<?php echo $item['id'];?>" class="video-item">
		<?php echo $item['link']; ?>
		</p>
		<?php
			if($i == 0) 
				$i = $item['id'];
		?>
	</div>
	<?php }?>
</div>
<script>
$(document).ready(function(){
	$(".video-item").hide();
	$("#item-video-<?php echo $i;?>").show();
	$(".title_video").click(function(){
		$(".video-item").hide();
		$(this).parent().children("p").show();
	});
});
</script>